Namespace - LJCNetCommon
Parameters
stream - The stream object.
Returns
The byte array.
Syntax
C# |
public static Byte[] MemStreamToBytes(Stream stream)
|
Copies a memory stream to a byte array. (E)
Example
C# |
using System.IO;
using LJCNetCommon;
private static void MemStreamToBytes()
{
byte[] textBytes;
using (Stream stream = NetCommon.StringToMemStream("Text"))
{
textBytes = NetCommon.MemStreamToBytes(stream);
}
string text = NetCommon.BytesToText(textBytes);
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.